<template>
  <div>
    <el-input v-model="mobile" placeholder="输入手机号"></el-input>
    <el-button @click="sub">绑定</el-button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      mobile: "",
    };
  },
  methods: {
    sub() {
      var data = {
        "mobile": this.mobile,
        "uid": this.$route.query.uid,
        "token": this.$route.query.token,
      };
      this.axios.post("/user/bindM", data).then((res) => {
        var data=res.data
        var userid=data.userid
        var token=data.token
        localStorage.setItem("token", token);
        localStorage.setItem("userid", userid);
        // window.location.href="http://localhost:8080/#/"
      });
    },
  },
};
</script>

<style>
</style>